package com.gordon.demo.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

import java.util.ArrayList;

@Configuration
@EnableSwagger2
public class SwaggerConfig {

    @Bean
    public Docket docket(){
        Contact contact = new Contact("gordon","dizhi","youx");
        ApiInfo apiInfo = new ApiInfo(
                "gordond1111",
                "zeasdmiao",
                "1.0",
                "dizhi",
                contact,
                "2.0",
                "dizhi",
                new ArrayList()
        );


        return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo).groupName("fenzu");
    }

    @Bean
    public Docket docket1(){
        Contact contact = new Contact("gordon","dizhi","youx");
        ApiInfo apiInfo = new ApiInfo(
                "gordond1111",
                "zeasdmiao",
                "1.0",
                "dizhi",
                contact,
                "2.0",
                "dizhi",
                new ArrayList()
        );


        return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo).groupName("fenzu1");
    }

}
